﻿
using System.Runtime.Serialization;
using EasyComm.Interfaces;
namespace EasyComm
{
    [DataContract]
    public class ServiceResponse : IServiceResponse
    {
        [DataMember]
        public int Code { get; private set; }

        [DataMember]
        public string Message { get; private set; }

        [DataMember]
        public MessageType MessageType { get; private set; }

        public ServiceResponse()
            : this(0, "OK", MessageType.Info)
        {

        }

        public ServiceResponse(int code, string message, MessageType messageType)
        {
            Message = message;
            MessageType = messageType;
        }
    }
}
